<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%> 

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品展示</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/goods.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>

</head>
<body style="background:url(img/top.jpg) repeat-x;" height="100%" >
		<div class="tools">
			<ul class="toolbar">
				<li><a href="<%=request.getContextPath()%>/goodsController/saveGoodsUI.action?pid=${goods.goods.goods_pid}" style="margin-top:4px;">
						<span style="margin-left:3px;color:white">添加商品<---</span></a>
				</li>
			</ul>
		</div>

	<div class="rightinfo">
		<ul class="classlist">
			<c:forEach items="${goodsList}" var="item" varStatus="status">
				<li style="height:250px;weight:350px;">
					<img src="<%=path%>/../webimages/${item.pictureUrl}" style="position:relative;width:160px;height:230px;margin-top:10px;"/>
					<div class="lright">
						<h3>商品名称: ${item.goods.goods_name}</h3>
						<h3>商品规格: ${item.goods.goods_norms}</h3>
						<h3>商品状态: ${item.goods.goods_status}</h3>
						<h3>商品价格: ${item.goods.goods_price}</h3>
						
						<h3>商品描述: </h3>
						<textarea  style="height:70px;width:140px;max-width: 140px;max-height: 70px;color:black">${item.goods.goods_shortDescription}</textarea>
						<a href="<%=request.getContextPath()%>/goodsController/editGoodsUI.action?pid=${item.goods.goods_pid}&goods_id=${item.goods.goods_id}" class="enter">修改商品</a>
						<a href="<%=request.getContextPath()%>/goodsController/deleteGoods.action?goods_pid=${item.goods.goods_pid}&goods_id=${item.goods.goods_id}" class="enter">删除商品</a>
						<c:choose>  
							   <c:when test="${item.goods.goods_isDel == '0'}">
							   		<a href="<%=request.getContextPath()%>/goodsController/updateGoodsStateById.action?goods_pid=${item.goods.goods_pid}&goods_id=${item.goods.goods_id}&goods_isDel=1" class="enter">暂停出售</a>
							   </c:when>  
							     
							   <c:otherwise> 
							   		<a href="<%=request.getContextPath()%>/goodsController/updateGoodsStateById.action?goods_pid=${item.goods.goods_pid}&goods_id=${item.goods.goods_id}&goods_isDel=0" class="enter">恢复出售</a>
							   </c:otherwise>  
						</c:choose>  
						
					 </div>
					</li>
			</c:forEach>
		</ul>
		
	</div>
</body>
</html>
